package com.tencent.XianCheng;

/**
 * 2
 * 
 * @author Administrator
 *
 */
public class HelloRunnableDemo {
	public static void main(String[] args) {
		//创建实现Runnable接口的类的实例
		HelloRunnable hr = new HelloRunnable();
		//创建一个thread类对象，将第一步 实例化得到的Runnable对象作为参数转入thread类的构造方法。
		Thread t = new Thread(hr,"a");
		t.start();
		Thread t2 = new Thread(hr,"b");
		t2.start();
	}
}
